Skip to content

Conversation

@shijiesheng
Copy link
Member

What
Add an example on how to batch start activities while holding concurrency limits

Why
Fanout use cases are common in workflows. However, current Cadence server doesn't support batch user cases well. The "correct" way to not bombard the server is to control the concurrency limits of activities so we don't experience lock contentions on mutable states.

Next
We might want to expose some APIs in client like workflow.BatchExecuteActivity so users can easily write scaling workflow code.

})
futures.Send(ctx, workflow.ExecuteActivity(aCtx, BatchActivity, taskID))
}
futures.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding a comment explaining what close does here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@shijiesheng shijiesheng merged commit 02594b0 into cadence-workflow:master May 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants